package org.linlinjava.litemall.db.dao.order_manage;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.*;
import org.linlinjava.litemall.db.vo.app.ServiceExtendsDoctor;
import org.linlinjava.litemall.db.vo.online.*;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author wj
 * @date 2021/8/6 18:02
 */
public interface AgedmallOnlineMapper {
    int insertOnlineProductBatch(List<AgedmallOnlineServiceProduct> list);

    List<OnlineServiceDto> getOnlineServiceList(@Param("shopId") Integer shopId, @Param("pClassId") Integer pClassId, @Param("classId") Integer classId, @Param("name") String name, @Param("stat") Integer stat);

    int updateOnlineCityProductBatchSelective(List<AgedmallOnlineCityProduct> list);

    int insertOnlineCityProductBatchSelective(List<AgedmallOnlineCityProduct> list);

    ServiceProductDto getOnlineServiceDepartment(int id);

    List<OnlineServiceDepartmentDto> getOnlineServiceDepartmentList(@Param("shopId") Integer shopId, @Param("provinceId") Integer provinceId
            , @Param("cityId") Integer cityId, @Param("name") String name);

    List<DepartmentListBackDto> getDepartmentList();

    List<UserAndDoctorCountDto> getSchedulingUserAndDoctorCount(@Param("cityId") Integer cityId, @Param("time") String time, @Param("docId") Integer docId);

    int deleteLitemallUserById(@Param("ids") List<Integer> ids);

    int deleteAgentByUserId(@Param("ids") List<Integer> ids);

    int deleteDoctorInfoByUserIds(@Param("ids") List<Long> ids);

    List<ServiceCityListSaveDto> getServiceCityListByIdList(@Param("ids") List<Integer> ids);

    List<DoctorMessageDto> selectHospitalList(@Param("shopId") Integer shopId, @Param("provinceId") Integer provinceId,
                                              @Param("cityId") Integer cityId, @Param("name") String name, @Param("deptId") Integer deptId);

    List<DoctorConsumeDto> selectDoctorConsumeList(@Param("id") Integer id, @Param("cityId") Integer cityId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<UserAndDoctorCountDto> getDoctorSchedulingUserCount(@Param("docId") Integer docId, @Param("time") String time);

    List<ServiceCityBackDto> selectServiceListByCityId(@Param("cityId") Integer cityId, @Param("keySearch") String keySearch,
                                                       @Param("shopId") Integer shopId
            , @Param("departmentId") Integer departmentId);

    List<AgedmallTimeTemplate> selectTimeTemplateList(@Param("shopId") Integer shopId, @Param("keySearch") String keySearch);

    List<AgedmallClassify> selectClassifyByService(Integer shopId);

    List<UnchooseCityBackDto> selectUnchooseCityList(@Param("id") Integer id, @Param("provinceId") Integer provinceId, @Param("cityId") Integer cityId, @Param("name") String name);

    List<OnlineServiceProductDto> getOnlineCityProductMessage(Integer onlineCityId);

    List<ChangeDoctorBackDto> selectChangeDoctorList(@Param("day") LocalDateTime day, @Param("startTime") LocalDateTime startTime,
                                                     @Param("endTime") LocalDateTime endTime,
                                                     @Param("serviceId") Integer serviceId, @Param("name") String name,
                                                     @Param("dpartmentId") Integer dpartmentId);

    List<ServiceExtendsDoctor> selectByDepartmentAndCity(@Param("departmentId") Integer departmentId, @Param("cityId") Integer cityId);

    List<AgedmallDoctorInfo> selectDoctorListByDeptIdAndOnlineCityId(@Param("deptId")Integer deptId,@Param("onlineCityId")Integer onlineCityId);
}
